/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Vista;

import Juego.Carta;
import Juego.Jugador;
import Juego.Mesa;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.util.List;
import java.util.Observable;
import java.util.Observer;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

/**
 *
 * @author Admin
 */
public class Interfaz extends javax.swing.JFrame implements Observer {

    private static Interfaz instancia;
    File rutaAbsoluta = new File("");

    public static Interfaz darInstancia() {
        if (instancia == null) {
            instancia = new Interfaz();
        }
        return instancia;
    }

    /**
     * Creates new form Interfaz
     */
    public Interfaz() {
        //        Obtengo la dimensión de la ventana.
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        this.setPreferredSize(d);
        this.setLocation(0, 0);
        this.setResizable(true);
        this.setLocationRelativeTo(null);
        this.setExtendedState(this.MAXIMIZED_BOTH);
        initComponents();
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.PanelConte.setPreferredSize(d);
        this.lblFondo.setPreferredSize(d);

        this.pack();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        PanelConte = new javax.swing.JPanel();
        btnIgualar = new javax.swing.JButton();
        btnPasar = new javax.swing.JButton();
        btnRetirarse = new javax.swing.JButton();
        btnApostar = new javax.swing.JButton();
        txtApuestaJug = new javax.swing.JTextField();
        lblCarta2 = new javax.swing.JLabel();
        lblCarta15 = new javax.swing.JLabel();
        lblCarta1 = new javax.swing.JLabel();
        lblCarta3 = new javax.swing.JLabel();
        lblCarta5 = new javax.swing.JLabel();
        lblCarta4 = new javax.swing.JLabel();
        lblCarta7 = new javax.swing.JLabel();
        lblCarta8 = new javax.swing.JLabel();
        lblCarta6 = new javax.swing.JLabel();
        lblCarta11 = new javax.swing.JLabel();
        lblCarta12 = new javax.swing.JLabel();
        lblCarta14 = new javax.swing.JLabel();
        lblCarta13 = new javax.swing.JLabel();
        lblCarta16 = new javax.swing.JLabel();
        lblCarta17 = new javax.swing.JLabel();
        lblCarta18 = new javax.swing.JLabel();
        lblCarta19 = new javax.swing.JLabel();
        lblCarta20 = new javax.swing.JLabel();
        lblCarta21 = new javax.swing.JLabel();
        lblCarta9 = new javax.swing.JLabel();
        lblPozoJug8 = new javax.swing.JLabel();
        lblNomJug8 = new javax.swing.JLabel();
        lblCarta10 = new javax.swing.JLabel();
        lblPozoJug1 = new javax.swing.JLabel();
        lblNomJug1 = new javax.swing.JLabel();
        lblPozoJug2 = new javax.swing.JLabel();
        lblNomJug2 = new javax.swing.JLabel();
        lblNomJug3 = new javax.swing.JLabel();
        lblPozoJug3 = new javax.swing.JLabel();
        lblNomJug4 = new javax.swing.JLabel();
        lblPozoJug4 = new javax.swing.JLabel();
        lblPozoJug5 = new javax.swing.JLabel();
        lblNomJug5 = new javax.swing.JLabel();
        lblPozoJug6 = new javax.swing.JLabel();
        lblNomJug6 = new javax.swing.JLabel();
        lblPozoJug7 = new javax.swing.JLabel();
        lblNomJug7 = new javax.swing.JLabel();
        lblFichasJug8 = new javax.swing.JLabel();
        lblFichasJug7 = new javax.swing.JLabel();
        lblFichasJug6 = new javax.swing.JLabel();
        lblFichasJug5 = new javax.swing.JLabel();
        lblFichasJug4 = new javax.swing.JLabel();
        lblFichasJug3 = new javax.swing.JLabel();
        lblFichasJug2 = new javax.swing.JLabel();
        lblFichasJug1 = new javax.swing.JLabel();
        lblDealer8 = new javax.swing.JLabel();
        lblContentJug3 = new javax.swing.JLabel();
        lblContentJug2 = new javax.swing.JLabel();
        lblContentJug4 = new javax.swing.JLabel();
        lblContentJug5 = new javax.swing.JLabel();
        lblContentJug6 = new javax.swing.JLabel();
        lblContentJug7 = new javax.swing.JLabel();
        lblContentJug = new javax.swing.JLabel();
        lblContentJug1 = new javax.swing.JLabel();
        lblPozoImagen = new javax.swing.JLabel();
        lblPozoMesa = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        lblDealer3 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        lblDealer5 = new javax.swing.JLabel();
        lblDealer4 = new javax.swing.JLabel();
        lblDealer1 = new javax.swing.JLabel();
        lblDealer2 = new javax.swing.JLabel();
        lblDealer6 = new javax.swing.JLabel();
        lblDealer7 = new javax.swing.JLabel();
        lblError = new javax.swing.JLabel();
        lblMesa = new javax.swing.JLabel();
        lblFondo = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(0, 0, 0));
        setLocationByPlatform(true);
        setMinimumSize(new java.awt.Dimension(1024, 768));
        getContentPane().setLayout(new java.awt.GridBagLayout());

        PanelConte.setBackground(new java.awt.Color(0, 0, 0));
        PanelConte.setAlignmentX(0.0F);
        PanelConte.setAlignmentY(0.0F);
        PanelConte.setAutoscrolls(true);
        PanelConte.setPreferredSize(new java.awt.Dimension(1366, 770));
        PanelConte.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btnIgualar.setText("Igualar");
        btnIgualar.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 4, true));
        PanelConte.add(btnIgualar, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 620, 80, 70));

        btnPasar.setText("Pasar");
        btnPasar.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 4, true));
        PanelConte.add(btnPasar, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 620, 80, 70));

        btnRetirarse.setText("Retirarse");
        btnRetirarse.setToolTipText("");
        btnRetirarse.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 4, true));
        btnRetirarse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRetirarseActionPerformed(evt);
            }
        });
        PanelConte.add(btnRetirarse, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 620, 80, 70));

        btnApostar.setText("Apostar");
        btnApostar.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 4, true));
        PanelConte.add(btnApostar, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 620, 80, 70));

        txtApuestaJug.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtApuestaJug.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        PanelConte.add(txtApuestaJug, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 660, 60, 30));

        lblCarta2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta2, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 410, -1, -1));

        lblCarta15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta15.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta15, new org.netbeans.lib.awtextra.AbsoluteConstraints(820, 350, -1, -1));

        lblCarta1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta1, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 410, -1, -1));

        lblCarta3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta3.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta3, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 410, -1, -1));

        lblCarta5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta5.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta5, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 400, -1, -1));

        lblCarta4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta4.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta4, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 410, -1, -1));

        lblCarta7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta7.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta7, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 140, -1, -1));

        lblCarta8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta8.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta8, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 70, -1, -1));

        lblCarta6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta6.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta6, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 310, -1, -1));

        lblCarta11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta11.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta11, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 60, -1, -1));

        lblCarta12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta12.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta12, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 60, -1, -1));

        lblCarta14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta14.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta14, new org.netbeans.lib.awtextra.AbsoluteConstraints(840, 170, -1, -1));

        lblCarta13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta13.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta13, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 70, -1, -1));

        lblCarta16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta16.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta16, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 420, -1, -1));

        lblCarta17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta17.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta17, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 240, -1, -1));

        lblCarta18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta18.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta18, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 240, -1, -1));

        lblCarta19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta19.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta19, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 240, -1, -1));

        lblCarta20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta20.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta20, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 240, -1, -1));

        lblCarta21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta21.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta21, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 240, -1, -1));

        lblCarta9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta9.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta9, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 60, -1, -1));

        lblPozoJug8.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug8.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug8.setText("jLabel1");
        PanelConte.add(lblPozoJug8, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 500, -1, -1));

        lblNomJug8.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug8.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug8.setText("jLabel2");
        PanelConte.add(lblNomJug8, new org.netbeans.lib.awtextra.AbsoluteConstraints(820, 500, -1, -1));

        lblCarta10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cartas/desocu.gif"))); // NOI18N
        lblCarta10.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        PanelConte.add(lblCarta10, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 60, -1, -1));

        lblPozoJug1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug1.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug1.setText("jLabel1");
        PanelConte.add(lblPozoJug1, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 560, -1, -1));

        lblNomJug1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug1.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug1.setText("jLabel2");
        PanelConte.add(lblNomJug1, new org.netbeans.lib.awtextra.AbsoluteConstraints(531, 560, 50, -1));

        lblPozoJug2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug2.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug2.setText("jLabel1");
        PanelConte.add(lblPozoJug2, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 560, -1, -1));

        lblNomJug2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug2.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug2.setText("jLabel2");
        PanelConte.add(lblNomJug2, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 560, -1, -1));

        lblNomJug3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug3.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug3.setText("jLabel2");
        PanelConte.add(lblNomJug3, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 460, -1, -1));

        lblPozoJug3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug3.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug3.setText("jLabel1");
        PanelConte.add(lblPozoJug3, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 460, -1, -1));

        lblNomJug4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug4.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug4.setText("jLabel2");
        PanelConte.add(lblNomJug4, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 100, -1, -1));

        lblPozoJug4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug4.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug4.setText("jLabel1");
        PanelConte.add(lblPozoJug4, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 100, -1, -1));

        lblPozoJug5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug5.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug5.setText("jLabel1");
        PanelConte.add(lblPozoJug5, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 30, -1, -1));

        lblNomJug5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug5.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug5.setText("jLabel2");
        PanelConte.add(lblNomJug5, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 30, -1, -1));

        lblPozoJug6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug6.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug6.setText("jLabel1");
        PanelConte.add(lblPozoJug6, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 30, -1, -1));

        lblNomJug6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug6.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug6.setText("jLabel2");
        PanelConte.add(lblNomJug6, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 30, -1, -1));

        lblPozoJug7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPozoJug7.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoJug7.setText("jLabel1");
        PanelConte.add(lblPozoJug7, new org.netbeans.lib.awtextra.AbsoluteConstraints(920, 130, -1, -1));

        lblNomJug7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNomJug7.setForeground(new java.awt.Color(255, 255, 255));
        lblNomJug7.setText("jLabel2");
        PanelConte.add(lblNomJug7, new org.netbeans.lib.awtextra.AbsoluteConstraints(860, 130, -1, -1));

        lblFichasJug8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug8, new org.netbeans.lib.awtextra.AbsoluteConstraints(970, 110, -1, -1));

        lblFichasJug7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug7, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 10, -1, -1));

        lblFichasJug6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug6, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 10, -1, -1));

        lblFichasJug5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug5, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 80, -1, -1));

        lblFichasJug4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug4, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 440, -1, -1));

        lblFichasJug3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug3, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 540, -1, -1));

        lblFichasJug2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug2, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 540, -1, -1));

        lblFichasJug1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichasJug.gif"))); // NOI18N
        PanelConte.add(lblFichasJug1, new org.netbeans.lib.awtextra.AbsoluteConstraints(930, 480, -1, -1));

        lblDealer8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer8, new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 330, -1, -1));

        lblContentJug3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug3, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 530, -1, 60));

        lblContentJug2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug2, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 530, -1, 60));

        lblContentJug4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 430, -1, 60));

        lblContentJug5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug5, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 70, -1, 60));

        lblContentJug6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug6, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 0, -1, 60));

        lblContentJug7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug7, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 0, -1, 60));

        lblContentJug.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug, new org.netbeans.lib.awtextra.AbsoluteConstraints(840, 100, -1, 60));

        lblContentJug1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/bm.gif"))); // NOI18N
        PanelConte.add(lblContentJug1, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 470, -1, 60));

        lblPozoImagen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fichas.gif"))); // NOI18N
        PanelConte.add(lblPozoImagen, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 250, -1, -1));

        lblPozoMesa.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        lblPozoMesa.setForeground(new java.awt.Color(255, 255, 255));
        lblPozoMesa.setText("Pozo");
        PanelConte.add(lblPozoMesa, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 330, 40, 30));

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Resolucion Recomendada : ");
        PanelConte.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));

        lblDealer3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer3, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 320, -1, -1));

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("1024 x 768p");
        PanelConte.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, -1, -1));

        lblDealer5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer5, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 190, -1, -1));

        lblDealer4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer4, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 220, -1, -1));

        lblDealer1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer1, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 370, -1, -1));

        lblDealer2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer2, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 370, -1, -1));

        lblDealer6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer6, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 190, -1, -1));

        lblDealer7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/dealer.gif"))); // NOI18N
        PanelConte.add(lblDealer7, new org.netbeans.lib.awtextra.AbsoluteConstraints(760, 250, -1, -1));

        lblError.setBackground(new java.awt.Color(204, 204, 204));
        lblError.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        lblError.setForeground(new java.awt.Color(255, 0, 0));
        lblError.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 0, 51)));
        PanelConte.add(lblError, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 580, -1, -1));

        lblMesa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fg-border.png"))); // NOI18N
        PanelConte.add(lblMesa, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 80, -1, -1));

        lblFondo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        lblFondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/fondo.jpg"))); // NOI18N
        lblFondo.setAlignmentY(0.0F);
        lblFondo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        PanelConte.add(lblFondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1030, 770));

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(23, 259, 24, 259);
        getContentPane().add(PanelConte, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnRetirarseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRetirarseActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRetirarseActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {



                new Interfaz().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JPanel PanelConte;
    public javax.swing.JButton btnApostar;
    public javax.swing.JButton btnIgualar;
    public javax.swing.JButton btnPasar;
    public javax.swing.JButton btnRetirarse;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    public javax.swing.JLabel lblCarta1;
    public javax.swing.JLabel lblCarta10;
    public javax.swing.JLabel lblCarta11;
    public javax.swing.JLabel lblCarta12;
    public javax.swing.JLabel lblCarta13;
    public javax.swing.JLabel lblCarta14;
    public javax.swing.JLabel lblCarta15;
    public javax.swing.JLabel lblCarta16;
    public javax.swing.JLabel lblCarta17;
    public javax.swing.JLabel lblCarta18;
    public javax.swing.JLabel lblCarta19;
    public javax.swing.JLabel lblCarta2;
    public javax.swing.JLabel lblCarta20;
    public javax.swing.JLabel lblCarta21;
    public javax.swing.JLabel lblCarta3;
    public javax.swing.JLabel lblCarta4;
    public javax.swing.JLabel lblCarta5;
    public javax.swing.JLabel lblCarta6;
    public javax.swing.JLabel lblCarta7;
    public javax.swing.JLabel lblCarta8;
    public javax.swing.JLabel lblCarta9;
    private javax.swing.JLabel lblContentJug;
    private javax.swing.JLabel lblContentJug1;
    private javax.swing.JLabel lblContentJug2;
    private javax.swing.JLabel lblContentJug3;
    private javax.swing.JLabel lblContentJug4;
    private javax.swing.JLabel lblContentJug5;
    private javax.swing.JLabel lblContentJug6;
    private javax.swing.JLabel lblContentJug7;
    public javax.swing.JLabel lblDealer1;
    public javax.swing.JLabel lblDealer2;
    public javax.swing.JLabel lblDealer3;
    public javax.swing.JLabel lblDealer4;
    public javax.swing.JLabel lblDealer5;
    public javax.swing.JLabel lblDealer6;
    public javax.swing.JLabel lblDealer7;
    public javax.swing.JLabel lblDealer8;
    public javax.swing.JLabel lblError;
    private javax.swing.JLabel lblFichasJug1;
    private javax.swing.JLabel lblFichasJug2;
    private javax.swing.JLabel lblFichasJug3;
    private javax.swing.JLabel lblFichasJug4;
    private javax.swing.JLabel lblFichasJug5;
    private javax.swing.JLabel lblFichasJug6;
    private javax.swing.JLabel lblFichasJug7;
    private javax.swing.JLabel lblFichasJug8;
    public javax.swing.JLabel lblFondo;
    public javax.swing.JLabel lblMesa;
    public javax.swing.JLabel lblNomJug1;
    public javax.swing.JLabel lblNomJug2;
    public javax.swing.JLabel lblNomJug3;
    public javax.swing.JLabel lblNomJug4;
    public javax.swing.JLabel lblNomJug5;
    public javax.swing.JLabel lblNomJug6;
    public javax.swing.JLabel lblNomJug7;
    public javax.swing.JLabel lblNomJug8;
    public javax.swing.JLabel lblPozoImagen;
    public javax.swing.JLabel lblPozoJug1;
    public javax.swing.JLabel lblPozoJug2;
    public javax.swing.JLabel lblPozoJug3;
    public javax.swing.JLabel lblPozoJug4;
    public javax.swing.JLabel lblPozoJug5;
    public javax.swing.JLabel lblPozoJug6;
    public javax.swing.JLabel lblPozoJug7;
    public javax.swing.JLabel lblPozoJug8;
    public javax.swing.JLabel lblPozoMesa;
    public javax.swing.JTextField txtApuestaJug;
    // End of variables declaration//GEN-END:variables

//    public void cargarCarta() {
//        ImageIcon carta3 = new ImageIcon("C:/Users/Carlos corbo/Documents/NetBeansProjects/Poker/src/cartas/11t.gif");
//        lblCarta18.setIcon(carta3);
//        this.paint(this.getGraphics());
//    }
    @Override
    public void update(Observable o, Object arg) {

        Integer pozo = ((Mesa) o).getPozo();
        List<Carta> cartas = ((Mesa) o).getLstCartas();
        List<Jugador> jugadores = ((Mesa) o).getLstJugadores();
        lblPozoMesa.setText(pozo.toString());
        ImageIcon carta = new ImageIcon();

        if (arg.toString().equalsIgnoreCase("CartasMesa")) {
            for (int i = 0; i < cartas.size(); i++) {
                if (cartas.get(i) != null) {
                    carta = new ImageIcon(buscarUrlCarta(cartas.get(i)));
                    switch (i) {
                        case 0:
                            lblCarta17.setIcon(carta);
                            break;
                        case 1:
                            lblCarta18.setIcon(carta);
                            break;
                        case 2:
                            lblCarta19.setIcon(carta);
                            break;
                        case 3:
                            lblCarta20.setIcon(carta);
                            break;
                        case 4:
                            lblCarta21.setIcon(carta);
                            break;
                    }
                }
            }
            if (cartas.isEmpty()) {

                carta = new ImageIcon(rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\desocu.gif");
                lblCarta17.setIcon(carta);
                lblCarta18.setIcon(carta);
                lblCarta19.setIcon(carta);
                lblCarta20.setIcon(carta);
                lblCarta21.setIcon(carta);
            }
            SwingUtilities.updateComponentTreeUI(this);
        } else if (arg.toString().equalsIgnoreCase("pozo")) {
            lblPozoMesa.setText(pozo.toString());
            SwingUtilities.updateComponentTreeUI(this);
        } else if (arg.toString().equalsIgnoreCase("lstJugadores")) {
            Integer indice = jugadores.lastIndexOf(((Mesa) o).buscarDealer());//Devuelve el indice en el que está ubicado el dealer

            for (int i = 0; i < jugadores.size(); i++) {
                if (i == 0) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug1.setForeground(Color.black);
                        lblPozoJug1.setForeground(Color.black);
                    } else {
                        lblNomJug1.setForeground(Color.white);
                        lblPozoJug1.setForeground(Color.white);
                    }
                    lblNomJug1.setText(jugadores.get(i).getNombre());
                    lblPozoJug1.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (jugadores.get(0).getLstCartas() != null) {
                        ImageIcon c1 = new ImageIcon(buscarUrlCarta(jugadores.get(0).getLstCartas().get(0)));
                        ImageIcon c2 = new ImageIcon(buscarUrlCarta(jugadores.get(0).getLstCartas().get(1)));
                        lblCarta1.setIcon(c1);
                        lblCarta2.setIcon(c2);
                    } else {
                        carta = new ImageIcon(rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\desocu.gif");
                        lblCarta1.setIcon(carta);
                        lblCarta2.setIcon(carta);
                    }
                    if (indice == i) {
                        lblDealer1.setVisible(true);
                    }
                } else if (i == 1) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug2.setForeground(Color.black);
                        lblPozoJug2.setForeground(Color.black);
                    } else {
                        lblNomJug2.setForeground(Color.white);
                        lblPozoJug2.setForeground(Color.white);
                    }
                    lblNomJug2.setText(jugadores.get(i).getNombre());
                    lblPozoJug2.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer2.setVisible(true);
                    }
                } else if (i == 2) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug3.setForeground(Color.black);
                        lblPozoJug3.setForeground(Color.black);
                    } else {
                        lblNomJug3.setForeground(Color.white);
                        lblPozoJug3.setForeground(Color.white);
                    }
                    lblNomJug3.setText(jugadores.get(i).getNombre());
                    lblPozoJug3.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer3.setVisible(true);
                    }
                } else if (i == 3) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug4.setForeground(Color.black);
                        lblPozoJug4.setForeground(Color.black);
                    } else {
                        lblNomJug4.setForeground(Color.white);
                        lblPozoJug4.setForeground(Color.white);
                    }
                    lblNomJug4.setText(jugadores.get(i).getNombre());
                    lblPozoJug4.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer4.setVisible(true);
                    }
                } else if (i == 4) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug5.setForeground(Color.black);
                        lblPozoJug5.setForeground(Color.black);
                    } else {
                        lblNomJug5.setForeground(Color.white);
                        lblPozoJug5.setForeground(Color.white);
                    }
                    lblNomJug5.setText(jugadores.get(i).getNombre());
                    lblPozoJug5.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer5.setVisible(true);
                    }
                } else if (i == 5) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug6.setForeground(Color.black);
                        lblPozoJug6.setForeground(Color.black);
                    } else {
                        lblNomJug6.setForeground(Color.white);
                        lblPozoJug6.setForeground(Color.white);
                    }
                    lblNomJug6.setText(jugadores.get(i).getNombre());
                    lblPozoJug6.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer6.setVisible(true);
                    }
                } else if (i == 6) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug7.setForeground(Color.black);
                        lblPozoJug7.setForeground(Color.black);
                    } else {
                        lblNomJug7.setForeground(Color.white);
                        lblPozoJug7.setForeground(Color.white);
                    }
                    lblNomJug7.setText(jugadores.get(i).getNombre());
                    lblPozoJug7.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer7.setVisible(true);
                    }
                } else if (i == 7) {
                    if (!jugadores.get(i).isActivo()) {
                        lblNomJug8.setForeground(Color.black);
                        lblPozoJug8.setForeground(Color.black);
                    } else {
                        lblNomJug8.setForeground(Color.white);
                        lblPozoJug8.setForeground(Color.white);
                    }
                    lblNomJug8.setText(jugadores.get(i).getNombre());
                    lblPozoJug8.setText(jugadores.get(i).getMontoDisponible().toString());
                    if (indice == i) {
                        lblDealer8.setVisible(true);
                    }
                }


            }

            SwingUtilities.updateComponentTreeUI(this);
//            JPanel temp = (JPanel) this.getContentPane();
//            SwingUtilities.updateComponentTreeUI(temp);
//            temp.validate();
        } else if (arg.toString().equalsIgnoreCase("dealer")) {

            if (lblDealer1.isVisible()) {
                lblDealer1.setVisible(false);
                lblDealer2.setVisible(true);
            } else if (lblDealer2.isVisible()) {
                lblDealer2.setVisible(false);
                lblDealer3.setVisible(true);
            } else if (lblDealer3.isVisible()) {
                lblDealer3.setVisible(false);
                lblDealer4.setVisible(true);
            } else if (lblDealer4.isVisible()) {
                lblDealer4.setVisible(false);
                lblDealer5.setVisible(true);
            } else if (lblDealer5.isVisible()) {
                lblDealer5.setVisible(false);
                lblDealer6.setVisible(true);
            } else if (lblDealer6.isVisible()) {
                lblDealer6.setVisible(false);
                lblDealer7.setVisible(true);
            } else if (lblDealer7.isVisible()) {
                lblDealer7.setVisible(false);
                lblDealer8.setVisible(true);
            } else if (lblDealer8.isVisible()) {
                lblDealer8.setVisible(false);
                lblDealer1.setVisible(true);
            }
            SwingUtilities.updateComponentTreeUI(this);
//            JPanel temp = (JPanel) this.getContentPane();
//            SwingUtilities.updateComponentTreeUI(temp);
//            temp.validate();
        } else if (arg.toString().equalsIgnoreCase("mostrarCartas")) {

            ImageIcon carta1 = new ImageIcon();

            for (int i = 1; i < jugadores.size(); i++) {

                carta = new ImageIcon(buscarUrlCarta(jugadores.get(i).getLstCartas().get(0)));
                carta1 = new ImageIcon(buscarUrlCarta(jugadores.get(i).getLstCartas().get(1)));
                switch (i) {

                    case 1:
                        lblCarta3.setIcon(carta);
                        lblCarta4.setIcon(carta1);
                        break;
                    case 2:
                        lblCarta5.setIcon(carta);
                        lblCarta6.setIcon(carta1);
                        break;
                    case 3:
                        lblCarta7.setIcon(carta);
                        lblCarta8.setIcon(carta1);
                        break;
                    case 4:
                        lblCarta9.setIcon(carta);
                        lblCarta10.setIcon(carta1);
                        break;
                    case 5:
                        lblCarta11.setIcon(carta);
                        lblCarta12.setIcon(carta1);
                        break;
                    case 6:
                        lblCarta13.setIcon(carta);
                        lblCarta14.setIcon(carta1);
                        break;
                    case 7:
                        lblCarta15.setIcon(carta);
                        lblCarta16.setIcon(carta1);
                        break;


                }

                SwingUtilities.updateComponentTreeUI(this);
            }
        } else if (arg.toString().equalsIgnoreCase("ocultarCartas")) {

            carta = new ImageIcon(rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\desocu.gif");
            
            lblCarta3.setIcon(carta);
            lblCarta4.setIcon(carta);
            lblCarta5.setIcon(carta);
            lblCarta6.setIcon(carta);
            lblCarta7.setIcon(carta);
            lblCarta8.setIcon(carta);
            lblCarta9.setIcon(carta);
            lblCarta10.setIcon(carta);
            lblCarta11.setIcon(carta);
            lblCarta12.setIcon(carta);
            lblCarta13.setIcon(carta);
            lblCarta14.setIcon(carta);
            lblCarta15.setIcon(carta);
            lblCarta16.setIcon(carta);

            SwingUtilities.updateComponentTreeUI(this);
        }

        //SwingUtilities.updateComponentTreeUI(this);
    }

    public String buscarUrlCarta(Carta cartaAux)//Devuelve la direccion absoluta de la imagen de la carta
    {
        try {

            String url = "";

            if (cartaAux.getPalo().equalsIgnoreCase("Trebol")) {

                for (int i = 1; i < 14; i++) {

                    if (cartaAux.getNumero() == i) {


                        return rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\" + i + "t.gif";
                    }

                }

            } else if (cartaAux.getPalo().equalsIgnoreCase("Diamante")) {

                for (int i = 1; i < 14; i++) {

                    if (cartaAux.getNumero() == i) {


                        return rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\" + i + "d.gif";
                    }

                }
            } else if (cartaAux.getPalo().equalsIgnoreCase("Pica")) {

                for (int i = 1; i < 14; i++) {

                    if (cartaAux.getNumero() == i) {


                        return rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\" + i + "p.gif";
                    }

                }
            } else if (cartaAux.getPalo().equalsIgnoreCase("Corazon")) {

                for (int i = 1; i < 14; i++) {

                    if (cartaAux.getNumero() == i) {


                        return rutaAbsoluta.getAbsolutePath() + "\\src\\cartas\\" + i + "c.gif";
                    }

                }
            }
            return url;

        } catch (Exception e) {
            return "Error";
        }
    }
}
